package cn.wolfcode.domain;

import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;

@Setter
@Getter
public class Salary {
    /** */
    private Long id;
    /** 工资金额*/
    private BigDecimal money;
    /** 年份*/
    private Integer year;
    /** 月份*/
    private Integer month;
    /** 员工*/
    private Employee employee;
    /** 发放方式*/
    private SystemDictionaryItem payout;

    public String getSalaryJson(){
        Map<String, Object> map = new HashMap<>();
        map.put("id", this.id);
        map.put("money", this.money);
        map.put("year", this.year);
        map.put("month", this.month);
        map.put("employee", this.employee);
        map.put("payout", this.payout);
        return JSON.toJSONString(map);
    }
}